package com.qf.smartdevice.pojo;


import org.springframework.util.StringUtils;

public class Areas implements CheckNull {

    private Long id;
    private String areaname;
    private Long parentid;
    private String parentname;
    private Long status;


    @Override
    public boolean isNull() {
        if (id == null) {
            return StringUtils.isEmpty(areaname) || StringUtils.isEmpty(status);
        } else {
            return StringUtils.isEmpty(areaname) && StringUtils.isEmpty(status) && StringUtils.isEmpty(parentid);
        }
    }

    public String getParentname() {
        return parentname;
    }

    public void setParentname(String parentname) {
        this.parentname = parentname;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }


    public String getAreaname() {
        return areaname;
    }

    public void setAreaname(String areaname) {
        this.areaname = areaname;
    }


    public Long getParentid() {
        return parentid;
    }

    public void setParentid(Long parentid) {
        this.parentid = parentid;
    }


    public Long getStatus() {
        return status;
    }

    public void setStatus(Long status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Areas{" +
                "id=" + id +
                ", areaname='" + areaname + '\'' +
                ", parentid=" + parentid +
                ", parentname='" + parentname + '\'' +
                ", status=" + status +
                '}';
    }
}
